iT邦幫忙

0

SQL REPORT 如果數字0,要以-顯示 (自訂程式)

  • 分享至 

  • xImage
  •  

1.新增報表程式碼:funtion ReplaceZero
2.於算運式中套用fuction ReplaceZero

https://ithelp.ithome.com.tw/upload/images/20240104/201067642fbk6uTD9w.png

Public Function ReplaceZero(stockCount As Decimal,replaceStr As String) As String
   If stockCount = "0" Then
       ReplaceZero=replaceStr
   Else
       ReplaceZero=Format(stockCount, "#,##0.##") 
   End If
End Function

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言